package com.xja.food.entity.util;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * @author 刘振升
 * @version 1.0
 * @date 2022/1/10 20:29
 * @description todo
 */
public class FileUtil {
    //处理文件名称
    public static String  getFileName(String filename){
        Date date = new Date();
        SimpleDateFormat  format = new SimpleDateFormat("yyyyMMddHHmmss");
        String newdate = format.format(date);
        return newdate+filename;
    }
    //处理文件路径
    public static String getFileDatePath(){
        Date date = new Date();
        SimpleDateFormat format = new SimpleDateFormat("yyyyMMdd");
        return format.format(date);
    }
}
